---
archived: true
title: Asciiw
date: 2014-02-12
description: ASCII Weather Report
status: 'production'
category: web
sort_index: 4
links:
    'Site': http://asciiw.userbound.com
    'Source' : http://github.com/mil/asciiw.userbound.com
    'Animation Frames' : https://github.com/mil/asciiw.userbound.com/blob/master/js/frames.js
---

[Asciiw](http://asciiw.userbound.com) is a little weather site I made using the [wunderground api](http://www.wunderground.com/weather/api/) which shows the basic weather status for your location along with some nice handcrafted ASCII animations.

Each animation is custom drawn in ASCII and cycled through with javascript. For example, here's the animation for rain! 

<script src="/assets/prj_demo/asciiw/js/frames.js"></script>
<script>
window.onload = function() {
  var wrap = document.getElementById("ascii-frames");
  if (wrap == null) { return; }

  var condition = 'raining';
  window.slide_count = 0;
  setInterval(function() {
    var frame = slides[condition]['frames'][window.slide_count].join("\n");
    window.slide_count =
      (window.slide_count == slides[condition]['frames'].length - 1) ?
        0 : window.slide_count + 1;

    wrap.innerHTML = frame;
 }, slides[condition]['interval']);
}
</script>

<pre class='ascii-frames' id="ascii-frames">
               ,--.,            
      ,--,--. (     ),   ,--.,  
     (       (,___,__)  (     ),
    (,___,____,)       (,___,__)
                 |              
      |                   |     
            |                   
                |      |        
          |                     
                                
             |      |           
</pre>

By default [asciiw](http://asciiw.userbound.com) uses my zip code in Madison, WI but can be switched to any zip code adding `/?zipcode` to the URL.

For example, to get the weather for Blacksburg, Virginia zipcode 24060 simply visit [asciiw.userbound.com/?24060](http://asciiw.userbound.com/?24060).
